package com.proton.carepatchtemp.utils.ui;

import android.support.annotation.StringRes;

import com.proton.carepatchtemp.application.VCare;
import com.sdsmdg.tastytoast.TastyToast;


/**
 * Created by MoonlightSW on 2016/11/15.
 */

public class ToastUtils {


    public static void s(String msg) {
        TastyToast.makeText(VCare.get(), msg, TastyToast.LENGTH_SHORT, TastyToast.SUCCESS).show();
    }


    public static void s(@StringRes int msg) {
        TastyToast.makeText(VCare.get(), VCare.get().getResources().getString(msg), TastyToast.LENGTH_SHORT, TastyToast.SUCCESS).show();
    }

    public static void i(String msg) {
        TastyToast.makeText(VCare.get(), msg, TastyToast.LENGTH_SHORT, TastyToast.DEFAULT).show();
    }


    public static void i(@StringRes int msg) {
        TastyToast.makeText(VCare.get(), VCare.get().getResources().getString(msg), TastyToast.LENGTH_SHORT, TastyToast.DEFAULT).show();
    }

    public static void w(String msg) {
        TastyToast.makeText(VCare.get(), msg, TastyToast.LENGTH_SHORT, TastyToast.WARNING).show();
    }


    public static void w(@StringRes int msg) {
        TastyToast.makeText(VCare.get(), VCare.get().getResources().getString(msg), TastyToast.LENGTH_SHORT, TastyToast.WARNING).show();
    }

    public static void e(String msg) {
        TastyToast.makeText(VCare.get(), msg, TastyToast.LENGTH_SHORT, TastyToast.ERROR).show();
    }


    public static void e(@StringRes int msg) {
        TastyToast.makeText(VCare.get(), VCare.get().getResources().getString(msg), TastyToast.LENGTH_SHORT, TastyToast.ERROR).show();
    }


    public static void iLong(String msg) {
        TastyToast.makeText(VCare.get(), msg, TastyToast.LENGTH_SHORT, TastyToast.DEFAULT).show();
    }

    public static void iLong(@StringRes int msg) {
        TastyToast.makeText(VCare.get(), VCare.get().getResources().getString(msg), TastyToast.LENGTH_LONG, TastyToast.DEFAULT).show();
    }

}
